package com.supermap.business.cloud.productC.specialty;

import com.alibaba.dubbo.config.annotation.Reference;
import com.supermap.dataservice.util.JSONUtils;
import com.supermap.dubbo.api.cloud.productC.SpecialtyService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author aqua
 * @desc
 * @date 2019年04月11 11:12
 * @email 1301584033@qq.com
 */
@RestController
@RequestMapping("/cloud/productC/specialty")
public class SpecialtyController {

    @Reference(timeout = 10000)
    private SpecialtyService specialtyService;

    @GetMapping("/getSpecialtyGrop")
    @ResponseBody
    public JSONUtils getSpecialtyGrop(Integer userId,String keyName){
        return  specialtyService.getProductSpecialtyGrop(userId,keyName);
    }
    @GetMapping("/getProductSpecialtyList")
    @ResponseBody
    public JSONUtils getProductSpecialtyList(Integer farmId, Integer pageSize){
        return  specialtyService.getProductSpecialtyList(farmId,pageSize);
    }
    @GetMapping("/getSpecialtyByUserIdList")
    @ResponseBody
    public JSONUtils getSpecialtyByUserIdList(String userId, Integer pageNum,Integer pageSize,Integer gropId){
        return  specialtyService.getSpecialtyByUserIdList(userId,pageNum,pageSize,gropId);
    }

    @GetMapping("/getSpecialtyByUserIdListJsonL")
    @ResponseBody
    public JSONUtils getSpecialtyByUserIdListJsonL(String userId, String areacode, Integer groupId){
        return  specialtyService.getSpecialtyByUserIdListJsonL(userId,areacode,groupId);
    }

    @GetMapping("/getSpecialtyCatalogByAreaCode")
    public JSONUtils getSpecialtyCatalogByAreaCode(String areaCode)
    {
        return specialtyService.getSpecialtyCatalogByAreaCode(areaCode);
    }
    @GetMapping("/getSpecialtyImgListByCodeAndModeName")
    public JSONUtils getSpecialtyImgListByCodeAndModeName(String areaCode  , String modeName)
    {
        return  specialtyService.getSpecialtyImgListByCodeAndModeName(areaCode , modeName);
    }

}
